package practice;

public class arrSum02 {
    public static void main(String[] args) {
        Sum();
    }
    public static void Sum() {
        int sum = 0;
        int tmp = 1;
        for(int i = 1;i <= 20;i++){
            tmp = 1;
            for(int j = 1;j <= i;j++){
                tmp *= j;
            }
            sum += tmp;
        }
        System.out.println(sum);
    }
}
